package com.example.demo.create.factory.abstract_factory;

import com.example.demo.create.factory.entity.Milk;
import com.example.demo.create.factory.factory_method.ComputerFactory;
import com.example.demo.create.factory.intf.ElectricProduct;
import com.example.demo.create.factory.intf.Food;

/**
 * Created by zzz on 2021/1/28 下午11:43
 */
public class XiaoMi extends AbstractFactory {
    @Override
    public ElectricProduct createProduct() {
        ElectricProduct computer = new ComputerFactory().createProduct();
        computer.brand("XIAOMI");
        return computer;
    }

    @Override
    public Food createFood() {
        return Milk.builder().brand("XIAOMI").build();
    }
}
